<template>
  <div>
    {{ count }}
    <button @click="updateCount(count + 1)">{{ count }}</button>
    <!-- <button @click="count++">{{ count }}</button> -->
    <h2>ComA </h2>
    <ComB></ComB>
  </div>
</template>
<script setup>
import ComB from '@/components/ComB.vue'
import { titleKey, countKey } from '@/key.js';

import { inject, provide } from 'vue';

const { count, updateCount } = inject(countKey)


</script>